﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DAL;
using System.Web.Security;

public partial class OrderItems : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Roles.IsUserInRole("Administrator"))
        {
            int orderId = Convert.ToInt32(Request.QueryString["OrderId"]);
            Order order = new Order();
            OrdersView.DataSource = order.GetOrderItems(orderId);
            OrdersView.DataBind();
        }
    }
}
